package com.dingqb.mycs.ui.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;

import com.base.BaseFragment;
import com.dingqb.mycs.R;
import com.dingqb.mycs.ui.activity.MainTestActivity;

public class MainTab1Fragment extends BaseFragment implements OnClickListener {
	@SuppressWarnings("unused")
	private TextView tv_test;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment_maintab01, container, false);
		tv_test = (TextView) view.findViewById(R.id.tv_test);
		tv_test.setOnClickListener(this);
		return view;
	}

	@Override
	public void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		System.out.println("MainWeixinFragment--onResume");
	}

	@Override
	public void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		System.out.println("MainWeixinFragment--onPause");
	}

	@Override
	public void onClick(View v) {
		int key = v.getId();
		switch (key) {
		case R.id.tv_test:
			Intent intent = new Intent(mContext, MainTestActivity.class);
			mContext.startActivity(intent);
			break;

		default:
			break;
		}

	}
}
